Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove is_bad_addr from connection_new's error #785

Merged
merged 1 commit into from
Jun 20, 2023

Conversation

tomaka
Copy link
Contributor

@tomaka tomaka commented Jun 20, 2023

After #529, the implementation of connection_new simply parses the multiaddress passed as parameter than notifies the upper layers that a connection must be opened.
If the connection couldn't be opened, the upper layers later call connection_reset.

The Rust code properly translates an error in connection_new as returning an error where is_bad_addr: true, and translates a later call to connection_reset as returning an error where is_bad_addr: false.

What this PR does is remove the fact that the error returned by connection_new can have is_bad_addr: true, as this is in practice never the case anymore.

@tomaka tomaka added this pull request to the merge queue Jun 20, 2023
Merged via the queue into smol-dot:main with commit 7bfa4ae Jun 20, 2023
@tomaka tomaka deleted the rm-is-bad-addr-connection-new branch June 20, 2023 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant